﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;

namespace Yuanna
{
    public partial class YuannaPathPoint : PhoneApplicationPage
    {
        int _pathId;

        public YuannaPathPoint()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 进入此页面
        /// </summary>
        /// <param name="e"></param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            if (NavigationContext.QueryString.ContainsKey("path_id"))
            {
                _pathId = int.Parse(NavigationContext.QueryString["path_id"]);
            }

            txtYuannaPathName.Text = txtYuannaPathName.Text + _pathId.ToString();
            allPointsListBox.ItemsSource = App.ViewModel.GetYuannaPath(_pathId).Points;
        }
    }
}